import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from "@/views/Layout"
import Search from "@/views/Search"
// import Play from "@/views/Play"
import Home from "@/views/Home"
import Play from "@/views/Play"
import Comment from "@/views/Comment"
Vue.use(VueRouter)

export default new VueRouter({
    routes: [
        {
            path: "/",
            redirect: "/layout"
        },
        {
            path: "/layout",
            redirect: "/layout/home",
            component: Layout,
            children: [
                {
                    path: "home",
                    component: Home,
                    meta: {
                        title: "主页"
                    }
                },
                {
                    path: "search",
                    component: Search,
                    meta: {
                        title: "搜索"
                    }
                }
            ]
        },
        {
            path: '/play',
            component: Play
        },

        {
            path: '/comment',
            component: Comment
        }



    ]
})



